using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VARANS
    {
        public DataRow Convert2ARANS(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryARANS(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["ARAMANDANT"] = " ".PadRight(2 ); 
         dwReturn["ARAAUFKRS"] = " ".PadRight(2 ); 
         dwReturn["ARAAUFLFD"] = " ".PadRight(6 ); 
         dwReturn["ARAAUFPOS"] = " ".PadRight(3 ); 
         dwReturn["ARAANSNR"] = " ".PadRight(0 ); 
         dwReturn["ARAAFOLGE"] = " ".PadRight(0 ); 
         dwReturn["ARATP"] = " ".PadRight(2 ); 
         dwReturn["ARAMNRKRS"] = " ".PadRight(2 ); 
         dwReturn["ARAMLFDNR"] = " ".PadRight(4 ); 
         dwReturn["ARAMPOS"] = " ".PadRight(2 ); 
         dwReturn["ARAMODNR"] = " ".PadRight(3 ); 
         dwReturn["ARAEINSTNR"] = " ".PadRight(3 ); 
         dwReturn["ARAREZART"] = " ".PadRight(1 ); 
         dwReturn["ARAREZNR"] = " ".PadRight(10 ); 
         dwReturn["ARAREZST"] = " ".PadRight(1 ); 
         dwReturn["ARADREZART"] = " ".PadRight(1 ); 
         dwReturn["ARADREZNR"] = " ".PadRight(10 ); 
         dwReturn["ARADREZST"] = " ".PadRight(1 ); 
         dwReturn["ARASCHAB"] = " ".PadRight(0 ); 
         dwReturn["ARAMGKG"] = " ".PadRight(0 ); 
         dwReturn["ARAMGKG2"] = " ".PadRight(0 ); 
         dwReturn["ARAMGMTR"] = " ".PadRight(0 ); 
         dwReturn["ARAMGVLT"] = " ".PadRight(0 ); 
         dwReturn["ARAMGANZ"] = " ".PadRight(0 ); 
         dwReturn["ARALGSTR"] = " ".PadRight(0 ); 
         dwReturn["ARABRT"] = " ".PadRight(0 ); 
         dwReturn["ARAMGKAU"] = " ".PadRight(0 ); 
         dwReturn["ARAGESCH"] = " ".PadRight(0 ); 
         dwReturn["ARAFA"] = " ".PadRight(0 ); 
         dwReturn["ARAFAF"] = " ".PadRight(0 ); 
         dwReturn["ARABED"] = " ".PadRight(0 ); 
         dwReturn["ARAAUFL"] = " ".PadRight(0 ); 
         dwReturn["ARASCHLW"] = " ".PadRight(0 ); 
         dwReturn["ARAFLOTTE"] = " ".PadRight(0 ); 
         dwReturn["ARAFLOTTEA"] = " ".PadRight(0 ); 
         dwReturn["ARARESTFL"] = " ".PadRight(0 ); 
         dwReturn["ARARESTPA"] = " ".PadRight(0 ); 
         dwReturn["ARABEHRPA"] = " ".PadRight(0 ); 
         dwReturn["ARABHNR1"] = " ".PadRight(0 ); 
         dwReturn["ARABHTFL1"] = " ".PadRight(0 ); 
         dwReturn["ARABHNR2"] = " ".PadRight(0 ); 
         dwReturn["ARABHTFL2"] = " ".PadRight(0 ); 
         dwReturn["ARABHNR3"] = " ".PadRight(0 ); 
         dwReturn["ARABHTFL3"] = " ".PadRight(0 ); 
         dwReturn["ARABHNR4"] = " ".PadRight(0 ); 
         dwReturn["ARABHTFL4"] = " ".PadRight(0 ); 
         dwReturn["ARABHNR5"] = " ".PadRight(0 ); 
         dwReturn["ARABHTFL5"] = " ".PadRight(0 ); 
         dwReturn["ARABHNR6"] = " ".PadRight(0 ); 
         dwReturn["ARABHTFL6"] = " ".PadRight(0 ); 
         dwReturn["ARABHANZ1"] = " ".PadRight(0 ); 
         dwReturn["ARABHTFLD1"] = " ".PadRight(0 ); 
         dwReturn["ARABHANZ2"] = " ".PadRight(0 ); 
         dwReturn["ARABHTFLD2"] = " ".PadRight(0 ); 
         dwReturn["ARABHANZ3"] = " ".PadRight(0 ); 
         dwReturn["ARABHTFLD3"] = " ".PadRight(0 ); 
         dwReturn["ARAFST"] = " ".PadRight(1 ); 
         dwReturn["ARAKONZ"] = " ".PadRight(1 ); 
         dwReturn["ARABDAT"] = " ".PadRight(0 ); 
         dwReturn["ARABZT"] = " ".PadRight(0 ); 
         dwReturn["ARAADAT"] = " ".PadRight(0 ); 
         dwReturn["ARAAZT"] = " ".PadRight(0 ); 
         dwReturn["ARABEHAUSG"] = " ".PadRight(1 ); 
         dwReturn["ARAKSTKRS"] = " ".PadRight(2 ); 
         dwReturn["ARAKST"] = " ".PadRight(4 ); 
         dwReturn["ARANACH"] = " ".PadRight(0 ); 
         dwReturn["ARAVERS"] = " ".PadRight(0 ); 
         dwReturn["ARAANZFB"] = " ".PadRight(0 ); 
         dwReturn["ARAAENDZL"] = " ".PadRight(0 ); 
         dwReturn["ARAAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["ARAAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["ARANEUBEN"] = " ".PadRight(8 ); 
         dwReturn["ARANEUDAT"] = " ".PadRight(0 ); 
         dwReturn["ARADRUKZ"] = " ".PadRight(1 ); 
         dwReturn["ARABLIND"] = " ".PadRight(1 ); 
         dwReturn["ARAABRKZ"] = " ".PadRight(1 ); 
         dwReturn["ARAFILLER"] = " ".PadRight(49 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapARANS(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveARANS(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryARANS(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapARANS(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertARANS(dwLocal, ITXDBVERSION);
            }
            UpdateARANS(dwLocal);
        }
        public void InsertARANS(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO ARANS(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryARANS(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM ARANS WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM ARANS  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "ARANS";
            Return = Result;
            return Return;
        }
        public void DeleteARANS(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM ARANS   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateARANS(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE ARANS SET "
                    +"ARAMANDANT= :ARAMANDANT,"
                    +"ARAAUFKRS= :ARAAUFKRS,"
                    +"ARAAUFLFD= :ARAAUFLFD,"
                    +"ARAAUFPOS= :ARAAUFPOS,"
                    +"ARAANSNR= :ARAANSNR,"
                    +"ARAAFOLGE= :ARAAFOLGE,"
                    +"ARATP= :ARATP,"
                    +"ARAMNRKRS= :ARAMNRKRS,"
                    +"ARAMLFDNR= :ARAMLFDNR,"
                    +"ARAMPOS= :ARAMPOS,"
                    +"ARAMODNR= :ARAMODNR,"
                    +"ARAEINSTNR= :ARAEINSTNR,"
                    +"ARAREZART= :ARAREZART,"
                    +"ARAREZNR= :ARAREZNR,"
                    +"ARAREZST= :ARAREZST,"
                    +"ARADREZART= :ARADREZART,"
                    +"ARADREZNR= :ARADREZNR,"
                    +"ARADREZST= :ARADREZST,"
                    +"ARASCHAB= :ARASCHAB,"
                    +"ARAMGKG= :ARAMGKG,"
                    +"ARAMGKG2= :ARAMGKG2,"
                    +"ARAMGMTR= :ARAMGMTR,"
                    +"ARAMGVLT= :ARAMGVLT,"
                    +"ARAMGANZ= :ARAMGANZ,"
                    +"ARALGSTR= :ARALGSTR,"
                    +"ARABRT= :ARABRT,"
                    +"ARAMGKAU= :ARAMGKAU,"
                    +"ARAGESCH= :ARAGESCH,"
                    +"ARAFA= :ARAFA,"
                    +"ARAFAF= :ARAFAF,"
                    +"ARABED= :ARABED,"
                    +"ARAAUFL= :ARAAUFL,"
                    +"ARASCHLW= :ARASCHLW,"
                    +"ARAFLOTTE= :ARAFLOTTE,"
                    +"ARAFLOTTEA= :ARAFLOTTEA,"
                    +"ARARESTFL= :ARARESTFL,"
                    +"ARARESTPA= :ARARESTPA,"
                    +"ARABEHRPA= :ARABEHRPA,"
                    +"ARABHNR1= :ARABHNR1,"
                    +"ARABHTFL1= :ARABHTFL1,"
                    +"ARABHNR2= :ARABHNR2,"
                    +"ARABHTFL2= :ARABHTFL2,"
                    +"ARABHNR3= :ARABHNR3,"
                    +"ARABHTFL3= :ARABHTFL3,"
                    +"ARABHNR4= :ARABHNR4,"
                    +"ARABHTFL4= :ARABHTFL4,"
                    +"ARABHNR5= :ARABHNR5,"
                    +"ARABHTFL5= :ARABHTFL5,"
                    +"ARABHNR6= :ARABHNR6,"
                    +"ARABHTFL6= :ARABHTFL6,"
                    +"ARABHANZ1= :ARABHANZ1,"
                    +"ARABHTFLD1= :ARABHTFLD1,"
                    +"ARABHANZ2= :ARABHANZ2,"
                    +"ARABHTFLD2= :ARABHTFLD2,"
                    +"ARABHANZ3= :ARABHANZ3,"
                    +"ARABHTFLD3= :ARABHTFLD3,"
                    +"ARAFST= :ARAFST,"
                    +"ARAKONZ= :ARAKONZ,"
                    +"ARABDAT= :ARABDAT,"
                    +"ARABZT= :ARABZT,"
                    +"ARAADAT= :ARAADAT,"
                    +"ARAAZT= :ARAAZT,"
                    +"ARABEHAUSG= :ARABEHAUSG,"
                    +"ARAKSTKRS= :ARAKSTKRS,"
                    +"ARAKST= :ARAKST,"
                    +"ARANACH= :ARANACH,"
                    +"ARAVERS= :ARAVERS,"
                    +"ARAANZFB= :ARAANZFB,"
                    +"ARAAENDZL= :ARAAENDZL,"
                    +"ARAAENDBEN= :ARAAENDBEN,"
                    +"ARAAENDDAT= :ARAAENDDAT,"
                    +"ARANEUBEN= :ARANEUBEN,"
                    +"ARANEUDAT= :ARANEUDAT,"
                    +"ARADRUKZ= :ARADRUKZ,"
                    +"ARABLIND= :ARABLIND,"
                    +"ARAABRKZ= :ARAABRKZ,"
                    +"ARAFILLER= :ARAFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("ARAMANDANT", OracleType.NVarChar).Value = dwData["ARAMANDANT"].ToString(); 
          or1.Parameters.Add("ARAAUFKRS", OracleType.NVarChar).Value = dwData["ARAAUFKRS"].ToString(); 
          or1.Parameters.Add("ARAAUFLFD", OracleType.NVarChar).Value = dwData["ARAAUFLFD"].ToString(); 
          or1.Parameters.Add("ARAAUFPOS", OracleType.NVarChar).Value = dwData["ARAAUFPOS"].ToString(); 
          or1.Parameters.Add("ARAANSNR", OracleType.NVarChar).Value = dwData["ARAANSNR"].ToString(); 
          or1.Parameters.Add("ARAAFOLGE", OracleType.NVarChar).Value = dwData["ARAAFOLGE"].ToString(); 
          or1.Parameters.Add("ARATP", OracleType.NVarChar).Value = dwData["ARATP"].ToString(); 
          or1.Parameters.Add("ARAMNRKRS", OracleType.NVarChar).Value = dwData["ARAMNRKRS"].ToString(); 
          or1.Parameters.Add("ARAMLFDNR", OracleType.NVarChar).Value = dwData["ARAMLFDNR"].ToString(); 
          or1.Parameters.Add("ARAMPOS", OracleType.NVarChar).Value = dwData["ARAMPOS"].ToString(); 
          or1.Parameters.Add("ARAMODNR", OracleType.NVarChar).Value = dwData["ARAMODNR"].ToString(); 
          or1.Parameters.Add("ARAEINSTNR", OracleType.NVarChar).Value = dwData["ARAEINSTNR"].ToString(); 
          or1.Parameters.Add("ARAREZART", OracleType.NVarChar).Value = dwData["ARAREZART"].ToString(); 
          or1.Parameters.Add("ARAREZNR", OracleType.NVarChar).Value = dwData["ARAREZNR"].ToString(); 
          or1.Parameters.Add("ARAREZST", OracleType.NVarChar).Value = dwData["ARAREZST"].ToString(); 
          or1.Parameters.Add("ARADREZART", OracleType.NVarChar).Value = dwData["ARADREZART"].ToString(); 
          or1.Parameters.Add("ARADREZNR", OracleType.NVarChar).Value = dwData["ARADREZNR"].ToString(); 
          or1.Parameters.Add("ARADREZST", OracleType.NVarChar).Value = dwData["ARADREZST"].ToString(); 
          or1.Parameters.Add("ARASCHAB", OracleType.NVarChar).Value = dwData["ARASCHAB"].ToString(); 
          or1.Parameters.Add("ARAMGKG", OracleType.NVarChar).Value = dwData["ARAMGKG"].ToString(); 
          or1.Parameters.Add("ARAMGKG2", OracleType.NVarChar).Value = dwData["ARAMGKG2"].ToString(); 
          or1.Parameters.Add("ARAMGMTR", OracleType.NVarChar).Value = dwData["ARAMGMTR"].ToString(); 
          or1.Parameters.Add("ARAMGVLT", OracleType.NVarChar).Value = dwData["ARAMGVLT"].ToString(); 
          or1.Parameters.Add("ARAMGANZ", OracleType.NVarChar).Value = dwData["ARAMGANZ"].ToString(); 
          or1.Parameters.Add("ARALGSTR", OracleType.NVarChar).Value = dwData["ARALGSTR"].ToString(); 
          or1.Parameters.Add("ARABRT", OracleType.NVarChar).Value = dwData["ARABRT"].ToString(); 
          or1.Parameters.Add("ARAMGKAU", OracleType.NVarChar).Value = dwData["ARAMGKAU"].ToString(); 
          or1.Parameters.Add("ARAGESCH", OracleType.NVarChar).Value = dwData["ARAGESCH"].ToString(); 
          or1.Parameters.Add("ARAFA", OracleType.NVarChar).Value = dwData["ARAFA"].ToString(); 
          or1.Parameters.Add("ARAFAF", OracleType.NVarChar).Value = dwData["ARAFAF"].ToString(); 
          or1.Parameters.Add("ARABED", OracleType.NVarChar).Value = dwData["ARABED"].ToString(); 
          or1.Parameters.Add("ARAAUFL", OracleType.NVarChar).Value = dwData["ARAAUFL"].ToString(); 
          or1.Parameters.Add("ARASCHLW", OracleType.NVarChar).Value = dwData["ARASCHLW"].ToString(); 
          or1.Parameters.Add("ARAFLOTTE", OracleType.NVarChar).Value = dwData["ARAFLOTTE"].ToString(); 
          or1.Parameters.Add("ARAFLOTTEA", OracleType.NVarChar).Value = dwData["ARAFLOTTEA"].ToString(); 
          or1.Parameters.Add("ARARESTFL", OracleType.NVarChar).Value = dwData["ARARESTFL"].ToString(); 
          or1.Parameters.Add("ARARESTPA", OracleType.NVarChar).Value = dwData["ARARESTPA"].ToString(); 
          or1.Parameters.Add("ARABEHRPA", OracleType.NVarChar).Value = dwData["ARABEHRPA"].ToString(); 
          or1.Parameters.Add("ARABHNR1", OracleType.NVarChar).Value = dwData["ARABHNR1"].ToString(); 
          or1.Parameters.Add("ARABHTFL1", OracleType.NVarChar).Value = dwData["ARABHTFL1"].ToString(); 
          or1.Parameters.Add("ARABHNR2", OracleType.NVarChar).Value = dwData["ARABHNR2"].ToString(); 
          or1.Parameters.Add("ARABHTFL2", OracleType.NVarChar).Value = dwData["ARABHTFL2"].ToString(); 
          or1.Parameters.Add("ARABHNR3", OracleType.NVarChar).Value = dwData["ARABHNR3"].ToString(); 
          or1.Parameters.Add("ARABHTFL3", OracleType.NVarChar).Value = dwData["ARABHTFL3"].ToString(); 
          or1.Parameters.Add("ARABHNR4", OracleType.NVarChar).Value = dwData["ARABHNR4"].ToString(); 
          or1.Parameters.Add("ARABHTFL4", OracleType.NVarChar).Value = dwData["ARABHTFL4"].ToString(); 
          or1.Parameters.Add("ARABHNR5", OracleType.NVarChar).Value = dwData["ARABHNR5"].ToString(); 
          or1.Parameters.Add("ARABHTFL5", OracleType.NVarChar).Value = dwData["ARABHTFL5"].ToString(); 
          or1.Parameters.Add("ARABHNR6", OracleType.NVarChar).Value = dwData["ARABHNR6"].ToString(); 
          or1.Parameters.Add("ARABHTFL6", OracleType.NVarChar).Value = dwData["ARABHTFL6"].ToString(); 
          or1.Parameters.Add("ARABHANZ1", OracleType.NVarChar).Value = dwData["ARABHANZ1"].ToString(); 
          or1.Parameters.Add("ARABHTFLD1", OracleType.NVarChar).Value = dwData["ARABHTFLD1"].ToString(); 
          or1.Parameters.Add("ARABHANZ2", OracleType.NVarChar).Value = dwData["ARABHANZ2"].ToString(); 
          or1.Parameters.Add("ARABHTFLD2", OracleType.NVarChar).Value = dwData["ARABHTFLD2"].ToString(); 
          or1.Parameters.Add("ARABHANZ3", OracleType.NVarChar).Value = dwData["ARABHANZ3"].ToString(); 
          or1.Parameters.Add("ARABHTFLD3", OracleType.NVarChar).Value = dwData["ARABHTFLD3"].ToString(); 
          or1.Parameters.Add("ARAFST", OracleType.NVarChar).Value = dwData["ARAFST"].ToString(); 
          or1.Parameters.Add("ARAKONZ", OracleType.NVarChar).Value = dwData["ARAKONZ"].ToString(); 
          or1.Parameters.Add("ARABDAT", OracleType.NVarChar).Value = dwData["ARABDAT"].ToString(); 
          or1.Parameters.Add("ARABZT", OracleType.NVarChar).Value = dwData["ARABZT"].ToString(); 
          or1.Parameters.Add("ARAADAT", OracleType.NVarChar).Value = dwData["ARAADAT"].ToString(); 
          or1.Parameters.Add("ARAAZT", OracleType.NVarChar).Value = dwData["ARAAZT"].ToString(); 
          or1.Parameters.Add("ARABEHAUSG", OracleType.NVarChar).Value = dwData["ARABEHAUSG"].ToString(); 
          or1.Parameters.Add("ARAKSTKRS", OracleType.NVarChar).Value = dwData["ARAKSTKRS"].ToString(); 
          or1.Parameters.Add("ARAKST", OracleType.NVarChar).Value = dwData["ARAKST"].ToString(); 
          or1.Parameters.Add("ARANACH", OracleType.NVarChar).Value = dwData["ARANACH"].ToString(); 
          or1.Parameters.Add("ARAVERS", OracleType.NVarChar).Value = dwData["ARAVERS"].ToString(); 
          or1.Parameters.Add("ARAANZFB", OracleType.NVarChar).Value = dwData["ARAANZFB"].ToString(); 
          or1.Parameters.Add("ARAAENDZL", OracleType.NVarChar).Value = dwData["ARAAENDZL"].ToString(); 
          or1.Parameters.Add("ARAAENDBEN", OracleType.NVarChar).Value = dwData["ARAAENDBEN"].ToString(); 
          or1.Parameters.Add("ARAAENDDAT", OracleType.NVarChar).Value = dwData["ARAAENDDAT"].ToString(); 
          or1.Parameters.Add("ARANEUBEN", OracleType.NVarChar).Value = dwData["ARANEUBEN"].ToString(); 
          or1.Parameters.Add("ARANEUDAT", OracleType.NVarChar).Value = dwData["ARANEUDAT"].ToString(); 
          or1.Parameters.Add("ARADRUKZ", OracleType.NVarChar).Value = dwData["ARADRUKZ"].ToString(); 
          or1.Parameters.Add("ARABLIND", OracleType.NVarChar).Value = dwData["ARABLIND"].ToString(); 
          or1.Parameters.Add("ARAABRKZ", OracleType.NVarChar).Value = dwData["ARAABRKZ"].ToString(); 
          or1.Parameters.Add("ARAFILLER", OracleType.NVarChar).Value = dwData["ARAFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
